Zero Values
All types in Odin have a Zero Value. As the name implies, this is the value of the type where every byte is zeroed. There are a few expressions to create a zero value:
For all types:
{}will produce the zero value.x: Foo = {},x: int = {},x: ^int = {}For numeric types,
0will produce the zero value.x: int = 0,x: quaternion128 = 0,x: f32 = 0For
nilable types,nilwill produce the zero value.x: ^int = nil,x: []Foo = nilFor a full list of nilable types, see Nilable Types